package com.prj.ufdm.demo.tutorial.hadoop.enums;

/**
  * Desc: MapReduce 运行方式
  * @author 胡义振  
  * @date 2020年05月23日 
  */
public enum MapReduceRunTypeEnum {

    MAP_REDUCE_RUN_TYPE_0("0","本地运行"),
    MAP_REDUCE_RUN_TYPE_1("1","远程自动提交到YARN上执行");
	
    private String code;
    private String message;

    MapReduceRunTypeEnum(String code, String message){
        this.code = code;
        this.message = message;
    }

    public static String geItemName(String itemCode){
        String rtnItemName = "";
        for (MapReduceRunTypeEnum zjlxCodeEnum : MapReduceRunTypeEnum.values()) {
            if(zjlxCodeEnum.code.equals(itemCode)){
                rtnItemName = zjlxCodeEnum.message;
            }
        }
        return rtnItemName;
    }

    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
}
